home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Misc / Crossword / Source / Notifier.h < prev    next >
Text File  |  1992-10-02  |  1KB  |  49 lines

  1. /*
  2.  
  3. File Notifier.h
  4.  
  5. A notifier alerts other objects when its status either changes or will change.  An object typically responds to the notification message by updating information that depends on the notifying object.
  6.  
  7. Objects that register for notification must respond to the update:message: method.  The first argument to this method is the object sending the notification.  The second is an integer that identifies the message.
  8.  
  9. */
  10.  
  11. #import <objc/Object.h>
  12.  
  13.  
  14. /* ————————————————————————————————————————————————————————————————————————————  */
  15.  
  16.  
  17.     //    — standard general purpose messages
  18.  
  19. #define DIDCHANGE        0
  20. #define WILLFREE        1
  21.  
  22.  
  23. /* ————————————————————————————————————————————————————————————————————————————  */
  24.  
  25.  
  26. @interface Notifier:Object
  27. {
  28.     id        receivers;
  29. }
  30.  
  31. - init;
  32. - free;
  33. - signup: (id) object;
  34. - unsignup: (id) object;
  35. - notify: (int) message;
  36.  
  37. @end
  38.  
  39.  
  40. /* ————————————————————————————————————————————————————————————————————————————  */
  41.  
  42.  
  43. @interface Receiver:Object
  44. {
  45. }
  46.  
  47. - update: (id) object  message: (int) theMessage;
  48.  
  49. @end